{{ if .IsPage }}
    {{ with .Params.image }}
        <!-- Twitter summary card with large image must be at least 280x150px -->
        <meta name="twitter:card" content="summary_large_image"/>
        <meta name="twitter:image" content="{{ .  | relURL }}"/>
    {{ else }}
        <meta name="twitter:card" content="summary"/>
    {{ end }}
{{ else }}
    <meta name="twitter:card" content="summary"/>
    {{ with .Site.Params.cover }}
    <meta name="twitter:image" content="{{ . | relURL }}"/>
    {{ end }}
{{ end }}

<!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{if .IsPage}}{{ .Description }}{{ else }}{{ .Site.Params.description }}{{ end }}"/>
<meta name="twitter:site" content="@{{ .Site.Params.twitterName }}"/>

